Skip to content

feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5… - #1880

Merged
maxime-oe merged 6 commits into
masterfrom
chain/somnia-p1_1
Jul 27, 2026
Merged

feat: add native SOMI + 5 ERC-20 tokens metadata for Somnia (eip155:5…#1880
maxime-oe merged 6 commits into
masterfrom
chain/somnia-p1_1

Conversation

@maxime-oe

@maxime-oe maxime-oe commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

…031)

Adds native slip44:111115031 (SOMI, distinct native token, not a plain-ETH chain) plus USDC.e, USDT, WETH, NIA, USDso ERC-20 metadata/icons. WSOMI already existed upstream and is untouched.

Addresses cross-verified live on-chain via eth_call symbol()/decimals() in this session; not just trusted from web/DeFiLlama search.

Icons: native SOMI and the 4 reused bridged-asset icons (USDC.e/USDT/ WETH) are real square+opaque SVGs (native from the official Somnia Notion brand kit, rebuilt to the network-icon padding convention; bridged assets reused from existing verified full-bleed-square icons elsewhere in this repo per references/phase-1-identity.md's icon sourcing strategy). NIA and USDso are real official/cross-verified PNGs (no clean SVG available for either).

Verified: npm test 100% pass (7071+14+18201+702), zero regressions.

Base network enablement test drill (chain/somnia-p1_1).


Note

Low Risk
Additive metadata and static icons only; no runtime, auth, or contract logic changes.

Overview
Registers Somnia (eip155:5031) token identity in the asset catalog: native SOMI via slip44:111115031 and five ERC-20 entries with on-chain-aligned names, symbols, and decimals.

New assets: Stargate-bridged USDC.e, USDT, and WETH (with matching SVG logos); NIA and USD Somnia (USDso) (PNG logos referenced in metadata). SVG artwork covers the native token and the three bridged stable/ETH icons shown in the diff.

Reviewed by Cursor Bugbot for commit e627a07. Bugbot is set up for automated code reviews on this repo. Configure here.

…031)

Adds native slip44:60 (SOMI, distinct native token, not a plain-ETH
chain) plus USDC.e, USDT, WETH, NIA, USDso ERC-20 metadata/icons.
WSOMI already existed upstream and is untouched.

Addresses cross-verified live on-chain via eth_call symbol()/decimals()
in this session; not just trusted from web/DeFiLlama search.

Icons: native SOMI and the 4 reused bridged-asset icons (USDC.e/USDT/
WETH) are real square+opaque SVGs (native from the official Somnia
Notion brand kit, rebuilt to the network-icon padding convention;
bridged assets reused from existing verified full-bleed-square icons
elsewhere in this repo per references/phase-1-identity.md's icon
sourcing strategy). NIA and USDso are real official/cross-verified PNGs
(no clean SVG available for either).

Verified: npm test 100% pass (7071+14+18201+702), zero regressions.

Base network enablement test drill (chain/somnia-p1_1).
@maxime-oe
maxime-oe requested review from a team and MRabenda as code owners July 24, 2026 05:57

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d3a9da0. Configure here.

slip44:60 is globally understood by real MetaMask backends (price-api,
and the external price-primitives.api.cx.metamask.io service) as "the
Ethereum coin", regardless of which chain's CAIP-19 namespace it's
referenced through. Somnia has no dedicated SLIP-44 registration --
coin type 60 was only reused locally as an identifier placeholder --
so filing SOMI's metadata under eip155:5031/slip44:60 set up any
consumer using this CAIP asset ID to silently receive Ethereum's price
(~$1861) instead of SOMI's real price (~$0.10). Confirmed live against
a running price-api instance.

Renamed to eip155:5031/erc20:0x0000000000000000000000000000000000000000,
matching the established precedent for chains with no dedicated
SLIP-44 registration (see Arc, eip155:5042, same pattern).

Verified: npm test - 7071/7071, 14/14, 18201/18201, 702/702 all
passing, zero regressions. asset:verify passes on the new CAIP id.

Base network enablement (chain/somnia-p1_1).
The previous commit renamed the files but the JSON's internal logo
reference still pointed at the old icons/.../slip44:60.svg path
instead of the renamed icons/.../erc20:0x0...svg file.

Base network enablement (chain/somnia-p1_1).
…nvention

New team convention for native-asset CAIP identifiers, in priority order:
1. erc20:<address> only if a real, verified, permanent contract exists that
   can fetch the native balance (checked against CoinGecko's own native
   token registration).
2. slip44:<coinType> from the real registry
   (github.com/satoshilabs/slips/blob/master/slip-0044.md) if registered.
3. slip44:60 if no registration exists AND the native genuinely is ETH.
4. slip44:11111<chainId> (a new MetaMask-invented, collision-free
   convention) if none of the above apply.

Somnia has no real balance-fetching contract for SOMI (the zero address
used previously was a placeholder, not a contract), no entry in the real
SLIP-44 registry (confirmed via live lookup against slip-0044.md), and its
native SOMI is not ETH -- so case 4 applies: slip44:111115031 (11111 +
chainId 5031). This also supersedes the erc20:0x0 fix from the previous
commit, which predates this convention being defined.

Verified: npm test - 7071/14/18201/702 all passing. asset:verify passes
on the new CAIP id.

Base network enablement (chain/somnia-p1_1).
Same stale-write issue as commit 9c0b261 -- the previous commit
captured the file before the logo path edit landed on disk.

Base network enablement (chain/somnia-p1_1).
Both Stargate-bridged asset entries (USDC.e, USDT) were added with
all-lowercase hex addresses in the CAIP-19 metadata filename, the
JSON's logo path, and the icon filename. This repo indexes by EIP-55
checksummed address (buildindex.js derives the map key straight from
the file path) and validates it in test/caip.js via
util.isValidChecksumAddress -- lowercase entries don't match documented
wallet lookups (toChecksumAddress) and would fail to resolve icons/
names for these two tokens.

Renamed both metadata/icon files to the correct EIP-55 checksum
(via ethereumjs-util.toChecksumAddress, the same lib the repo's own
tests use) and updated each JSON's logo path to match. Caught by
Cursor Bugbot on commit d3a9da0.

npm test: 7071/14/18201/702 all passing.
@maxime-oe
maxime-oe merged commit f698b1a into master Jul 27, 2026
9 checks passed
@maxime-oe
maxime-oe deleted the chain/somnia-p1_1 branch July 27, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants